export default {
	// 收藏
	onAddToFavorites: function(id, money = 0) {
		switch (id) {
			case 1:
				return this.property(id, money);
				break;
			case 3:
				return this.divorce(id, money);
				break;
			case 4:
				return this.personality(id, money);
				break;
			case 5:
				return this.intellectual(id, money);
				break;
			case 6:
				return this.laborDisputes(id, money);
				break;
			case 7:
				return this.administration(id, money);
				break;
			case 8:
				return this.trademark(id, money);
				break;
			case 9:
				return this.jurisdiction(id, money);
				break;
		}
	},
	// 1 财产案件
	property: function(id, money) {
		let computeInfo = {
			id,
			money
		}

		let acceptance_fee = 0.00; // 受理费
		let preservation_fee = 0.00; // 保全费
		let execution_fee = '50-500'; // 执行费
		
		if (money < 10000) {
			acceptance_fee = 50; // 受理费
		} else if (money < 100000) { // 10万
			acceptance_fee = money * 0.025 - 200; // 受理费
		} else if (money < 200000) { // 20万
			acceptance_fee = money * 0.02 + 300; // 受理费
		} else if (money < 1000000) { // 100万
			acceptance_fee = money * 0.01 + 3800; // 受理费
		} else if (money < 2000000) {
			acceptance_fee = money * 0.009 + 4800; // 受理费
		} else if (money < 5000000) {
			acceptance_fee = money * 0.008 + 6800; // 受理费
		} else if (money < 10000000) {
			acceptance_fee = money * 0.007 + 11800; // 受理费
		}else if (money < 20000000) {
			acceptance_fee = money * 0.006 + 21800; // 受理费
		} else if (money >= 20000000) {
			acceptance_fee = money * 0.005 + 41800; // 受理费
		}
		
		if (money < 1000) {
			preservation_fee = 30; // 保全费
		} else if (money < 100000) { // 10万
			preservation_fee = money * 0.01 + 20; // 保全费
		} else if (money < 896000) {
			preservation_fee = money * 0.005 + 520; // 保全费
		} else if (money >= 896000) {
			preservation_fee = 5000; // 保全费
		}

		if (money < 10000) {
			execution_fee = 50; // 执行费
		} else if (money < 500000) {
			execution_fee = money * 0.015 - 100; // 执行费
		} else if (money < 5000000) {
			execution_fee = money * 0.01 + 2400; // 执行费
		} else if (money < 10000000) {
			execution_fee = money * 0.005 + 27400; // 执行费
		} else if (money >= 10000000) {
			execution_fee = money * 0.001 + 67400; // 执行费
		}

		return {
			...computeInfo,
			acceptance_fee: (acceptance_fee.toFixed(2)) + '元',
			execution_fee: (execution_fee.toFixed(2)) + '元',
			preservation_fee: (preservation_fee.toFixed(2)) + '元',
		}
	},
	// 3 divorce 离婚案件
	divorce: function(id, money) {
		let computeInfo = {
			id,
			money
		}
		
		let acceptance_fee = '不涉及财产分割 每件50~300元,涉及财产分割 '; // 受理费
		let preservation_fee = 0.00; // 保全费
		let execution_fee = '50~500'; // 执行费
		
		if (money < 200000) { // 20万
			acceptance_fee += '免费' ; // 受理费
		} else if (money > 200000) {
			acceptance_fee += (money * 0.005).toFixed(2) + '元'; // 受理费
		}
		
		if (money < 1000) {
			preservation_fee = 30; // 保全费
		} else if (money < 100000) { // 10万
			preservation_fee = money * 0.01 + 20; // 保全费
		} else if (money < 896000) {
			preservation_fee = money * 0.005 + 520; // 保全费
		} else if (money >= 896000) {
			preservation_fee = 5000; // 保全费
		}
		
		if (money < 10000) {
			execution_fee = 50; // 执行费
		} else if (money < 500000) {
			execution_fee = money * 0.015 - 100; // 执行费
		} else if (money < 5000000) {
			execution_fee = money * 0.01 + 2400; // 执行费
		} else if (money >= 10000000) {
			execution_fee = money * 0.001 + 67400; // 执行费
		}
		
		return {
			...computeInfo,
			acceptance_fee: acceptance_fee,
			execution_fee: (execution_fee.toFixed(2)) + '元',
			preservation_fee: (preservation_fee.toFixed(2)) + '元',
		}
	},
	// 4 personality 人格人权案件
	personality: function(id, money) {
		let computeInfo = {
			id,
			money
		}
		
		let acceptance_fee = '不涉及赔偿 每件100~500元,涉及损害赔偿 '; // 受理费
		let preservation_fee = 0.00; // 保全费
		let execution_fee = '50~500'; // 执行费
		
		if (money < 50000) { // 5万
			acceptance_fee += '免费' ; // 受理费
		} else if (money < 100000) {
			acceptance_fee += (money * 0.001).toFixed(2) + '元'; // 受理费
		} else if (money >= 100000) {
			acceptance_fee += (money * 0.005).toFixed(2) + '元'; // 受理费
		}
		
		if (money < 1000) {
			preservation_fee = 30; // 保全费
		} else if (money < 100000) { // 10万
			preservation_fee = money * 0.01 + 20; // 保全费
		} else if (money < 896000) {
			preservation_fee = money * 0.005 + 520; // 保全费
		} else if (money >= 896000) {
			preservation_fee = 5000; // 保全费
		}
		
		if (money < 10000) {
			execution_fee = 50; // 执行费
		} else if (money < 500000) {
			execution_fee = money * 0.015 - 100; // 执行费
		} else if (money < 5000000) {
			execution_fee = money * 0.01 + 2400; // 执行费
		} else if (money >= 10000000) {
			execution_fee = money * 0.001 + 67400; // 执行费
		}
		
		return {
			...computeInfo,
			acceptance_fee: acceptance_fee,
			execution_fee: (execution_fee.toFixed(2)) + '元',
			preservation_fee: (preservation_fee.toFixed(2)) + '元',
		}
	},
	// 5 知识产权案件 intellectual
	intellectual: function(id, money) {
		let computeInfo = {
			id,
			money
		}
		
		let acceptance_fee = '没有争议金额的 1000元 有争议金额的 '; // 受理费
		let preservation_fee = 0.00; // 保全费
		let execution_fee = '50-500'; // 执行费
		
		if (money < 10000) {
			acceptance_fee += 50 + '元'; // 受理费
		} else if (money < 100000) { // 10万
			acceptance_fee += ((money * 0.025 - 200).toFixed(2)) + '元'; // 受理费
		} else if (money < 200000) { // 20万
			acceptance_fee += ((money * 0.02 + 300).toFixed(2)) + '元'; // 受理费
		} else if (money < 1000000) { // 100万
			acceptance_fee += ((money * 0.01 + 3800).toFixed(2)) + '元'; // 受理费
		} else if (money < 2000000) {
			acceptance_fee += ((money * 0.009 + 4800).toFixed(2)) + '元'; // 受理费
		} else if (money < 5000000) {
			acceptance_fee += ((money * 0.008 + 6800).toFixed(2)) + '元'; // 受理费
		} else if (money < 10000000) {
			acceptance_fee += ((money * 0.007 + 11800).toFixed(2)) + '元'; // 受理费
		}else if (money < 20000000) {
			acceptance_fee += ((money * 0.006 + 21800).toFixed(2)) + '元'; // 受理费
		} else if (money >= 20000000) {
			acceptance_fee += ((money * 0.005 + 41800).toFixed(2)) + '元'; // 受理费
		}
		
		if (money < 1000) {
			preservation_fee = 30; // 保全费
		} else if (money < 100000) { // 10万
			preservation_fee = money * 0.01 + 20; // 保全费
		} else if (money < 896000) {
			preservation_fee = money * 0.005 + 520; // 保全费
		} else if (money >= 896000) {
			preservation_fee = 5000; // 保全费
		}
		
		if (money < 10000) {
			execution_fee = 50; // 执行费
		} else if (money < 500000) {
			execution_fee = money * 0.015 - 100; // 执行费
		} else if (money < 5000000) {
			execution_fee = money * 0.01 + 2400; // 执行费
		} else if (money < 10000000) {
			execution_fee = money * 0.005 + 27400; // 执行费
		} else if (money >= 10000000) {
			execution_fee = money * 0.001 + 67400; // 执行费
		}
		
		return {
			...computeInfo,
			acceptance_fee: acceptance_fee,
			execution_fee: (execution_fee.toFixed(2)) + '元',
			preservation_fee: (preservation_fee.toFixed(2)) + '元',
		}
	},
	// 6.劳动争议案件
	laborDisputes: function(id, money) {
		let computeInfo = {
			id,
			money
		}
		
		let acceptance_fee = 10; // 受理费
		let preservation_fee = 0.00; // 保全费
		let execution_fee = '50-500'; // 执行费
		
		
		if (money < 1000) {
			preservation_fee = 30; // 保全费
		} else if (money < 100000) { // 10万
			preservation_fee = money * 0.01 + 20; // 保全费
		} else if (money < 896000) {
			preservation_fee = money * 0.005 + 520; // 保全费
		} else if (money >= 896000) {
			preservation_fee = 5000; // 保全费
		}
		
		if (money < 10000) {
			execution_fee = 50; // 执行费
		} else if (money < 500000) {
			execution_fee = money * 0.015 - 100; // 执行费
		} else if (money < 5000000) {
			execution_fee = money * 0.01 + 2400; // 执行费
		} else if (money < 10000000) {
			execution_fee = money * 0.005 + 27400; // 执行费
		} else if (money >= 10000000) {
			execution_fee = money * 0.001 + 67400; // 执行费
		}
		
		return {
			...computeInfo,
			acceptance_fee: (acceptance_fee.toFixed(2)) + '元',
			execution_fee: (execution_fee.toFixed(2)) + '元',
			preservation_fee: (preservation_fee.toFixed(2)) + '元',
		}
	},

	// 7.行政案件
	administration: function(id, money) {
		let computeInfo = {
			id,
			money
		}
		
		let acceptance_fee = 100; // 受理费
		let preservation_fee = 0.00; // 保全费
		let execution_fee = '50-500'; // 执行费
		
		
		if (money < 1000) {
			preservation_fee = 30; // 保全费
		} else if (money < 100000) { // 10万
			preservation_fee = money * 0.01 + 20; // 保全费
		} else if (money < 896000) {
			preservation_fee = money * 0.005 + 520; // 保全费
		} else if (money >= 896000) {
			preservation_fee = 5000; // 保全费
		}
		
		if (money < 10000) {
			execution_fee = 50; // 执行费
		} else if (money < 500000) {
			execution_fee = money * 0.015 - 100; // 执行费
		} else if (money < 5000000) {
			execution_fee = money * 0.01 + 2400; // 执行费
		} else if (money < 10000000) {
			execution_fee = money * 0.005 + 27400; // 执行费
		} else if (money >= 10000000) {
			execution_fee = money * 0.001 + 67400; // 执行费
		}
		
		return {
			...computeInfo,
			acceptance_fee: (acceptance_fee.toFixed(2)) + '元',
			execution_fee: (execution_fee.toFixed(2)) + '元',
			preservation_fee: (preservation_fee.toFixed(2)) + '元',
		}
	},

	// 8.商标、专利、海事行政案件
	trademark: function(id, money) {
		let computeInfo = {
			id,
			money
		}
		
		let acceptance_fee = 100; // 受理费
		let preservation_fee = 0.00; // 保全费
		let execution_fee = '50-500'; // 执行费
		
		
		if (money < 1000) {
			preservation_fee = 30; // 保全费
		} else if (money < 100000) { // 10万
			preservation_fee = money * 0.01 + 20; // 保全费
		} else if (money < 896000) {
			preservation_fee = money * 0.005 + 520; // 保全费
		} else if (money >= 896000) {
			preservation_fee = 5000; // 保全费
		}
		
		if (money < 10000) {
			execution_fee = 50; // 执行费
		} else if (money < 500000) {
			execution_fee = money * 0.015 - 100; // 执行费
		} else if (money < 5000000) {
			execution_fee = money * 0.01 + 2400; // 执行费
		} else if (money < 10000000) {
			execution_fee = money * 0.005 + 27400; // 执行费
		} else if (money >= 10000000) {
			execution_fee = money * 0.001 + 67400; // 执行费
		}
		
		return {
			...computeInfo,
			acceptance_fee: (acceptance_fee.toFixed(2)) + '元',
			execution_fee: (execution_fee.toFixed(2)) + '元',
			preservation_fee: (preservation_fee.toFixed(2)) + '元',
		}
	},

	// 9.管辖权异议不成立案件
	jurisdiction: function(id, money) {
		let computeInfo = {
			id,
			money
		}
		
		let acceptance_fee = 100; // 受理费
		let preservation_fee = 0.00; // 保全费
		let execution_fee = '50-500'; // 执行费
		
		
		if (money < 1000) {
			preservation_fee = 30; // 保全费
		} else if (money < 100000) { // 10万
			preservation_fee = money * 0.01 + 20; // 保全费
		} else if (money < 896000) {
			preservation_fee = money * 0.005 + 520; // 保全费
		} else if (money >= 896000) {
			preservation_fee = 5000; // 保全费
		}
		
		if (money < 10000) {
			execution_fee = 50; // 执行费
		} else if (money < 500000) {
			execution_fee = money * 0.015 - 100; // 执行费
		} else if (money < 5000000) {
			execution_fee = money * 0.01 + 2400; // 执行费
		} else if (money < 10000000) {
			execution_fee = money * 0.005 + 27400; // 执行费
		} else if (money >= 10000000) {
			execution_fee = money * 0.001 + 67400; // 执行费
		}
		
		return {
			...computeInfo,
			acceptance_fee: (acceptance_fee.toFixed(2)) + '元',
			execution_fee: (execution_fee.toFixed(2)) + '元',
			preservation_fee: (preservation_fee.toFixed(2)) + '元',
		}
	},

}